package com.qifeng.modules.userInfo.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.qifeng.common.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

@Entity
@Table(name = "user_info")
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel(value = "")
public class UserInfo extends BaseEntity<Long> implements Serializable {

    private String openId;

    private String name;

    private String phone;

    private String password;

    private String realname;

    private Integer type;

    private String username;

    public UserInfo() {
    }

    public UserInfo(UserInfo userInfo) {
        super(userInfo.getId(), userInfo.getCreateTime(), userInfo.getUpdateTime(), userInfo.getUpdateBy(), userInfo.getCreateBy());
        this.openId = userInfo.getOpenId();
        this.name = userInfo.getName();
        this.phone = userInfo.getPhone();
        this.password = userInfo.getPassword();
        this.realname = userInfo.getRealname();
        this.type = userInfo.getType();
        this.username = userInfo.getUsername();
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    @Basic
    @ApiModelProperty(value = "微信openId")
    @Column(name = "open_id")
    public String getOpenId() {
        return this.openId;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @ApiModelProperty(value = "用户名")
    @Column(name = "name")
    public String getName() {
        return this.name;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Basic
    @ApiModelProperty(value = "手机号")
    @Column(name = "phone")
    public String getPhone() {
        return this.phone;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Basic
    @ApiModelProperty(value = "密码")
    @Column(name = "password")
    public String getPassword() {
        return this.password;
    }


    public void setRealname(String realname) {
        this.realname = realname;
    }

    @Basic
    @ApiModelProperty(value = "")
    @Column(name = "realname")
    public String getRealname() {
        return this.realname;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Basic
    @ApiModelProperty(value = "", example = "123")
    @Column(name = "type")
    public Integer getType() {
        return this.type;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @Basic
    @ApiModelProperty(value = "")
    @Column(name = "username")
    public String getUsername() {
        return this.username;
    }


}